<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div class="a">手写AsyncAwait</div>
  </body>
  <script>
    // 了解bind,call,apply这三个函数的定义和this的指向问题
  async function name(params) {
    await new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(1);
      }, 1000);
    });
  }

  </script>
  <style>
    .a {
      color: rgba(0, 17, 255, 0.418);
    }
  </style>
</html>
